package com.px.dal;

import java.util.List;

import org.apache.ibatis.session.SqlSession;

import com.px.idal.IProjectClassMapper;
import com.px.model.ProjectClass;
import com.px.mybatisunit.MyBatisUtil;
public class ProjectClassMapper {
	// 创建SqlSession对象的实例
		SqlSession session = MyBatisUtil.getsqlSession(true);
		// IUserInfoMapper接口通过sqlsession的getmap方法,完成实现,全部自动化
		IProjectClassMapper mapper = session.getMapper(IProjectClassMapper.class);

		// 查询所有项目分类
		public List<ProjectClass> getAllProjectClass() {
			return mapper.getAllProjectClass();
		}

		// 查询指定id项目分类
		public List<ProjectClass> getProjectClassByProjectClassId(ProjectClass projectClass) {
			return mapper.getProjectClassByProjectClassId(projectClass);
		};
		// 增加项目分类
		public int insertProjectClass(ProjectClass projectClass) {
			return mapper.insertProjectClass(projectClass);
		};

		// 更新指定id的项目分类的属性
		public int updateProjectClassByProjectClassId(ProjectClass projectClass) {
			return mapper.updateProjectClassByProjectClassId(projectClass);
		};

		// 删除指定指定id的项目分类的属性
		public int deleteProjectClassByProjectClassId(ProjectClass project_class_id) {
			return mapper.deleteProjectClassByProjectClassId(project_class_id);
		};

		// 查询项目分类信息总条数
		public int getAllProjectClassCounts() {
			return mapper.getAllProjectClassCounts();
		};

		// 查询指定项目分类名项目分类是否存在
		public int checkProjectClassIdIsExist(ProjectClass projectClass) {
			return mapper.checkProjectClassIdIsExist(projectClass);
		}

}
